#### license: creative commons cc0 1.0 (public domain) 
#### http://creativecommons.org/publicdomain/zero/1.0/ 
function vget g k
python
    return g[k]
    fig
    fig

function save p g
    glen     vget g "g"        len
    tlen     ".save"  len    times -1  plus glen
    filename vget g "g"        ltrim  rtrim     right tlen  ltrim
    ck 1
    sv 1
python
    try: f = open(filename) ; f.close()
    except: ck = 0
    fig
    iftrue ck
        sv 0
        q "file exists, overwrite? (y/n) " prints lineinput ltrim rtrim lcase
        ifequal q "y"
            sv 1
            fig
        fig
    iftrue sv
python
    try:
        with open(filename, "w") as outfile:
            for each in p:
                outfile.write((each + chr(10)).encode('utf-8'))
    except: pass
    fig
        fig
    fig



